package com.mgq.juc.design.guard.v2;

/**
 * @author MaGuangQi
 * @description
 * @date 2021-12-16 10:51
 **/
public class Test {

    public static void main(String[] args) throws InterruptedException {
        //创建3个接收人
        for (int i = 0; i < 3; i++) {
            new People().start();
        }
        Thread.sleep(1000);
        for (Integer id : MailBoxes.getIds()) {
            new PostMan(id, "内容" + id).start();
        }
    }
}
